/PROG  PNS0200
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "XUAN.ZHUAN.CS";
PROG_SIZE	= 3574;
CREATE		= DATE 23-02-07  TIME 09:06:12;
MODIFIED	= DATE 23-08-18  TIME 13:44:14;
FILE_NAME	= PNS0047;
VERSION		= 0;
LINE_COUNT	= 125;
MEMORY_SIZE	= 4026;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0047 ;
   7:  !  PART:53160691/93 ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.2    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:  DO[43]=PULSE,1.0sec ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:  OVERRIDE=R[5] ;
  34:   ;
  35:  TIMER[2]=STOP ;
  36:  R[1]=R[1]+1    ;
  37:  R[2]=TIMER[2]    ;
  38:  R[3]=60/R[2]    ;
  39:  TIMER[2]=RESET ;
  40:  TIMER[2]=START ;
  41:   ;
  42:  !PROCEED TO PICK ;
  43:  LBL[20] ;
  44:  IF DI[1]=ON AND DI[8]=ON,JMP LBL[25] ;
  45:  IF DI[29]=ON,JMP LBL[90] ;
  46:  JMP LBL[20] ;
  47:   ;
  48:  LBL[25] ;
  49:  OVERRIDE=R[5] ;
  50:   ;
  51:J P[3:PICK APPROACH] 100% CNT100 ACC100    ;
  52:   ;
  53:  DO[1]=OFF ;
  54:J P[4:PICK] 50% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  55:J P[15] 100% CNT50    ;
  56:   ;
  57:J P[6:PICK APPROACH] 100% CNT100 ACC100    ;
  58:  DO[1]=OFF ;
  59:J P[14:PICK] 50% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  60:J P[16] 100% CNT50    ;
  61:  PAYLOAD[2] ;
  62:  CALL CHK_PICK    ;
  63:   ;
  64:J P[5:PICK DEPART] 100% CNT70 ACC100    ;
  65:  DO[44]=PULSE,1.0sec ;
  66:  CALL CHECK_PICK    ;
  67:  DO[1]=ON ;
  68:  DO[8]=PULSE,1.0sec ;
  69:  MONITOR Z_CHECH ;
  70:J P[7:PICK CLEAR] 100% CNT100 ACC100 DB  500.0mm,CALL END_PICK    ;
  71:   ;
  72:  LBL[30:GOTO DROP POUNCE] ;
  73:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  74:  OVERRIDE=R[5] ;
  75:   ;
  76:  LBL[40:AT DROP POUNCE] ;
  77:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  78:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  79:  IF DI[18]=ON,JMP LBL[60] ;
  80:  JMP LBL[40] ;
  81:   ;
  82:  LBL[50:MOVE DROP SNEAK] ;
  83:  OVERRIDE=R[5] ;
  84:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  85:  LBL[51:DROP OR C-P-S] ;
  86:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  87:  IF DI[18]=ON,JMP LBL[40] ;
  88:  JMP LBL[51] ;
  89:  JMP LBL[50] ;
  90:   ;
  91:  LBL[60:MOVE CLS-PRS-ACC] ;
  92:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  93:  PAUSE ;
  94:  JMP LBL[30] ;
  95:   ;
  96:  LBL[80:DROP ENABLED] ;
  97:  !PROCEED TO DROP ;
  98:  TIMER[4]=RESET ;
  99:  TIMER[4]=START ;
 100:   ;
 101:  DO[4]=OFF ;
 102:  OVERRIDE=R[5] ;
 103:J P[10:DROP APPROACH] 100% CNT30 ACC100 TA   0.00sec,DO[7]=PULSE,1.0sec    ;
 104:  MONITOR END Z_CHECH ;
 105:  DO[6]=PULSE,1.0sec ;
 106:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC110 BREAK    ;
 107:  PAYLOAD[1] ;
 108:  CALL CHK_DROP    ;
 109:  OVERRIDE=R[5] ;
 110:J P[12:DROP DEPART] 100% CNT100 ACC130    ;
 111:  TIMER[4]=STOP ;
 112:J P[13:DROP CLEAR] 100% CNT100 ACC130    ;
 113:  !GOTO PICK POUNCE ;
 114:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 115:  DO[43]=PULSE,1.0sec ;
 116:  IF DI[29]=ON,JMP LBL[90] ;
 117:  JMP LBL[10] ;
 118:   ;
 119:  LBL[90:END OF CYCLE] ;
 120:  TIMER[1]=STOP ;
 121:  R[4]=TIMER[1]    ;
 122:J P[1:MIDDLE] 50% CNT100    ;
 123:  MOVE TO HOME    ;
 124:   ;
 125:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2613.039  mm,	Y =    16.985  mm,	Z =  -680.000  mm,
	W =  -179.895 deg,	P =     -.122 deg,	R =   -90.003 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2753.313  mm,	Y =   153.241  mm,	Z =  -785.200  mm,
	W =  -179.382 deg,	P =      .004 deg,	R =   -90.015 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2921.395  mm,	Y =   324.966  mm,	Z =  -900.478  mm,
	W =  -179.402 deg,	P =      .006 deg,	R =   -90.011 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2921.395  mm,	Y =   324.965  mm,	Z =  -995.278  mm,
	W =  -179.402 deg,	P =      .006 deg,	R =   -90.011 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2753.445  mm,	Y =  -471.287  mm,	Z =  -796.502  mm,
	W =  -179.384 deg,	P =      .005 deg,	R =   -90.017 deg
};
P[6:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2438.234  mm,	Y =  -179.880  mm,	Z =  -922.099  mm,
	W =  -179.942 deg,	P =      .371 deg,	R =   -89.193 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2826.148  mm,	Y =  -228.890  mm,	Z =  -788.260  mm,
	W =  -179.652 deg,	P =      .276 deg,	R =   -89.784 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2795.303  mm,	Y =  -741.517  mm,	Z =  -829.280  mm,
	W =   179.852 deg,	P =      .370 deg,	R =   -88.458 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2869.605  mm,	Y = -2086.656  mm,	Z =  -921.102  mm,
	W =   179.532 deg,	P =      .775 deg,	R =   -89.026 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2794.335  mm,	Y = -3345.791  mm,	Z =  -964.481  mm,
	W =  -179.817 deg,	P =     -.741 deg,	R =   -89.183 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2794.335  mm,	Y = -3345.791  mm,	Z = -1060.001  mm,
	W =  -179.817 deg,	P =     -.741 deg,	R =   -89.183 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2794.335  mm,	Y = -3345.791  mm,	Z =  -964.481  mm,
	W =  -179.817 deg,	P =     -.741 deg,	R =   -89.183 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2745.992  mm,	Y = -1485.654  mm,	Z =  -751.939  mm,
	W =   179.534 deg,	P =     1.153 deg,	R =   -89.332 deg
};
P[14:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2438.235  mm,	Y =  -179.880  mm,	Z = -1006.099  mm,
	W =  -179.942 deg,	P =      .371 deg,	R =   -89.193 deg
};
P[15]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2921.395  mm,	Y =   324.966  mm,	Z =  -900.478  mm,
	W =  -179.402 deg,	P =      .006 deg,	R =   -90.011 deg
};
P[16]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2438.235  mm,	Y =  -179.880  mm,	Z =  -936.738  mm,
	W =  -179.942 deg,	P =      .371 deg,	R =   -89.193 deg
};
/END
